<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html style="font-size:50px;">
	<head>
		<title>开奖记录</title>
		<%@include file="/WEB-INF/base.jspf"%>
		<style type="text/css">
			.qiu{margin:1px;color:white;width:0.44rem;height:0.44rem;line-height:0.44rem;font-size:0.28rem;display:inline-block;background: #E63131;border-radius:50%;text-align: center;}
			.shengxiao{margin:1px;width:0.44rem;height:0.44rem;line-height:0.44rem;font-size:0.28rem;display:inline-block;border-radius:50%;text-align: center;}
			.btn2{background: none;border: 0;color: #009ac3;font-size: 15px;padding:3px 0px; border-radius:5px;}
			.btn3{border:0px;border-radius:50px;padding:2px;width:26px;height:26px;line-height:20px;color: white;}
			.qiu0{background: #D8D21C!important;}
			.qiu1{background: #D8D21C!important;}
			.qiu2{background: #3273F9!important;}
			.qiu3{background: #515567!important;}
			.qiu4{background: #E6962D!important;}
			.qiu5{background: #0EC2C4!important;}
			.qiu6{background: #2D35D0!important;}
			.qiu7{background: #AEAFC5!important;}
			.qiu8{background: #E63131!important;}
			.qiu9{background: #7C1F1F!important;}
			.qiu10{background: #2DCC21!important;}
			/* .xg1,.xg2,.xg7,.xg8,.xg12,.xg13,.xg18,.xg19,.xg23,.xg24,.xg29,.xg30,.xg34,.xg35,.xg40,.xg45,.xg46{background:#F02828!important;}
			.xg5,.xg6,.xg9,.xg10,.xg14,.xg15,.xg20,.xg25,.xg26,.xg31,.xg36,.xg37,.xg41,.xg42,.xg47,.xg48{background:#09B832!important;}
			.xg3,.xg4,.xg11,.xg16,.xg17,.xg21,.xg22,.xg27,.xg28,.xg32,.xg33,.xg38,.xg39,.xg43,.xg44,.xg49{background:#336DCC!important;}
			 */
			.xg1,.xg2,.xg7,.xg8,.xg12,.xg13,.xg18,.xg19,.xg23,.xg24,.xg29,.xg30,.xg34,.xg35,.xg40,.xg45,.xg46{background:#F02828!important;}
			.xg3,.xg4,.xg9,.xg10,.xg14,.xg15,.xg20,.xg25,.xg26,.xg31,.xg36,.xg37,.xg41,.xg42,.xg47,.xg48{background:#336DCC!important;}
			.xg16,.xg17,.xg21,.xg22,.xg27,.xg28,.xg32,.xg33,.xg38,.xg39,.xg43,.xg44,.xg49,.xg5,.xg6,.xg11{background:#09B832!important;}
			
			
			/* .green{border-radius:10px; border:1px solid silver ;box-shadow: 2px 3px 1px silver;padding:10px;line-height:30px;margin:10px 20px;text-align: left;border-top:5px solid green;} */
			.green{padding: 10px;border-bottom: 1px solid #F5F5F5;line-height: 30px;text-align:left;}
			.qihao{color:#333333;}
			.time{color:gray;font-size:13px;margin-left: 20px;}
			
			.shaizi{
				display:block;
				float:left;
				margin-right:10px;
				width: 0.56rem;
    			height: 0.56rem;
    			margin-top: 3px;
			}
		
		</style>
	</head>
	<body style="height: 100%;">
		<div class="bg-theme col-xs-12 col-sm-4 col-sm-offset-4 text-center top" stlye="padding-left:10px;padding-right:10px;">
			<a onclick="back()" class="glyphicon glyphicon-chevron-left fl" style="cursor:pointer; color: white;position:absolute;top:50%;transform:translateY(-50%);font-size: 20px;left:10px;"></a>
			<span style="font-weight:700;">${data[0].gameNameInChinese }　开奖记录</span>
		</div>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4" style="margin-top: 60px;margin-bottom: 60px;padding:0;">
			<span id="cname" class="hidden">${data[0].cname }</span>
			<c:forEach items="${data }" var="d">
				<div class="green qihao${d.period }">
					<span class="qihao">第${d.period }期</span><span class="time">${d.lottertime }</span><br>
					<span class="lotternumber">${d.lotternumber }</span>
					<c:if test="${d.cname.contains('k3') || d.cname.contains('ssc')}">
						<span class="hezhi" style="margin-left: 10px;">${d.playResult }</span>
					</c:if>	
					<%-- <c:if test="${l.cname.contains('ssc')}">
						<span class="hezhi hezhi1">${l.playResult }</span>
					</c:if>	 --%>
					<c:if test="${d.cname.contains('xg6hc') || d.cname.contains('5f6hc')}">
						<br><span class="xg6hc1"></span>
					</c:if>	
				</div>
			</c:forEach>
		</div>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4 foot" style="position: fixed;border-top:0px;text-align: center;">
			<button data="${data[0].cname}" class="btn btn-primary" id="lijixiazhu" style="width: 96%;font-weight:bold;font-size:16px;">立即下注</button>
		</div>
		<script type="text/javascript">
			$("#lijixiazhu").click(function(){
				window.location.href="/lotter/lot.do?zl="+$(this).attr("data")
			})
			 $lotNum = $(".lotternumber")
			for(var i = 0;i <$lotNum.length;i++ ){
				var d = $lotNum.eq(i).text().split(",")
				var x = "";
				for(var j=0;j<d.length-1;j++){
					if($("#cname").text()=="bjpk10"||$("#cname").text()=="2fpk10"||$("#cname").text()=="xyft"||$("#cname").text()=="xysm" ||$("#cname").text()=="2fft" ){
						x+="<span class='qiu qiu"+Number(d[j])+"'>"+d[j]+"</span>"
					}else if($("#cname").text()=="xg6hc" || $("#cname").text()=="5f6hc"){
						if(j==d.length-2){
							x+="<span style='font-size:16px;font-weight:bold;color:black'>+</span>";
						}
						x+="<span class='qiu xg"+Number(d[j])+"'>"+d[j]+"</span>"
					} else if($("#cname").text()=="ahk3" || $("#cname").text()=="gxk3" || $("#cname").text()=="jsk3" || $("#cname").text()=="3fk3" || $("#cname").text()=="bjk3" ||$("#cname").text()=="2fk3"){
						x+="<span class='shaizi sz"+d[j]+"'></span>"
					}else if($("#cname").text()=="gdkl10f" || $("#cname").text()=="cqkl10f"){
						x+="<span class='klsf sg"+d[j]+"'></span>"
					} 
					else{
						x+="<span class='qiu'>"+d[j]+"</span>"
					}
				}
				$lotNum.eq(i).html(x)
				if($("#cname").text()=="xg6hc" || $("#cname").text()=="5f6hc" ){
					$x1 = $lotNum.eq(i).find("span");
					var qihao=$lotNum.eq(i).parent(".green").find(".qihao").text().replace("第","").replace("期","");
					var y="";
					for(var j=0;j<$x1.length;j++){
						y+=$x1.eq(j).text()+",";
					}
					$.ajax({
						url:"/lotter/xgattr.do",
						type:"post",
						data:{lotterNum:y.replace("+,",""),qihao:qihao},
						success:function(data){
							var d1=data.data.split(",");
							var x1="";
							for(var k=0;k<d1.length-1;k++){
								if(k==d1.length-2){
									x1+="<span style='font-size:16px;font-weight:bold;color:black'>+</span>";
								}
								x1+="<span class='shengxiao'>"+d1[k]+"</span>"
							}
							$(".qihao"+data.message+" .xg6hc1").html(x1)
						}
					});
				}
			} 
		</script>
	</body>
</html>
